package org.NooLab.itexx.app.gui.handlers;

import org.NooLab.itexx.ITexxWindowCommons;
import org.NooLab.itexx.app.gui.definition.ITexxWindowGuiIntf;
import org.NooLab.utilities.logging.PrintLog;

public class PopupItemsSelectionHandler {

	ITexxWindowCommons appCommons;
	private ITexxWindowGuiIntf windowGui;
	private PrintLog out;
	int panelIndex=-1 ;
	
	
	public PopupItemsSelectionHandler(ITexxWindowCommons commons, int panelIndex, int itemIndex){
		
		appCommons = commons;
		out = appCommons.out;
		
		windowGui = appCommons.getWindowGui();
		
		windowGui.getjPanelScrollWrapFoundStack().repaint();
		appCommons.getPanelProducer().getPanels().getItem(panelIndex).repaint();
		
		this.panelIndex = panelIndex;
		handlingItemSelection(itemIndex);
	}

	private void handlingItemSelection(int itemIndex) {
		// 
		
		/*  first part of the definition in "ResultPanelPopupMenu"
		 * 
			resultPanelsjPopupMenu.add( getMenuPopup(0, handler, "open") );
			resultPanelsjPopupMenu.add( getMenuPopup(1, handler, "store permanently") );
			resultPanelsjPopupMenu.add( getMenuPopup(2, handler, "remove & dismiss") );
 
		 */
		out.printErr(2, "handling popup item selection <"+itemIndex+"> ...");
		if (itemIndex==1){
			
		}

		if (itemIndex==2){
			
		}

		if (itemIndex==3){
			
		}

	}
	
	
	
}
